package com.zhentao.controller;

import com.zhentao.service.DoctorService;
import com.zhentao.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin(origins = "*")
@RequestMapping("/api/doctor")
public class DoctorController {
    @Autowired
    private DoctorService doctorService;
    @RequestMapping("findByDid")
    public Result findByDid(@RequestParam("did") Integer did) {
        return Result.OK(doctorService.findByDid(did));
    }
}
